<!-- 用户招聘信息管理中心  -->
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="s" uri="/struts-tags"%>
<html lang="en">

<head>
	<title>招聘信息管理中心</title>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<!-- VENDOR CSS -->
	<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">

	<link href="jqgrid/css/ui.jqgrid-bootstrap.min.css" rel="stylesheet" />
	<link href="jqgrid/css/bootstrap.min.css" rel="stylesheet"/>
	<link rel="stylesheet" href="assets/vendor/bootstrap/css/bootstrap.min.css">
	
	<link rel="stylesheet" href="assets/vendor/linearicons/style.css">
	<link rel="stylesheet" href="assets/vendor/chartist/css/chartist-custom.css">
	<!-- MAIN CSS -->
	<link rel="stylesheet" href="assets/css/main.css">
	<!-- FOR DEMO PURPOSES ONLY. You should remove this in your project -->
	<link rel="stylesheet" href="assets/css/demo.css">
	<!-- GOOGLE FONTS -->
	
	<!-- ICONS -->
	<link rel="apple-touch-icon" sizes="76x76" href="assets/img/apple-icon.png">
	<link rel="icon" type="image/png" sizes="96x96" href="assets/img/favicon.png">
	
	<link rel="stylesheet" href="//apps.bdimg.com/libs/jqueryui/1.10.4/css/jquery-ui.min.css">
 
    <link rel="stylesheet" href="jqueryui/style.css">
</head>

<body>
<div id="dialog-form" title="家教信息">
</div>

	<!-- WRAPPER -->
	<div id="wrapper">
		<!-- NAVBAR -->
		<nav class="navbar navbar-default navbar-fixed-top">
			<div class="brand">
				<a href=""><img src="assets/img/logo-dark.png" alt="Klorofil Logo" class="img-responsive logo"></a>
			</div>
			<div class="container-fluid">
				<div class="navbar-btn">
					<button type="button" class="btn-toggle-fullwidth"><i class="lnr lnr-arrow-left-circle"></i></button>
				</div>
				<form class="navbar-form navbar-left">
					<div class="input-group">
						<input type="text" value="" class="form-control" placeholder="Search course...">
						<span class="input-group-btn"><button type="button" class="btn btn-primary">Go</button></span>
					</div>
				</form>
				<div class="navbar-btn navbar-btn-right">
					<a class="btn btn-success update-pro" href="#downloads/klorofil-pro-bootstrap-admin-dashboard-template/?utm_source=klorofil&utm_medium=template&utm_campaign=KlorofilPro" title="Upgrade to Pro" target="_blank"><i class="fa fa-rocket"></i> <span>UPGRADE TO PRO</span></a>
				</div>
				<div id="navbar-menu">
					<ul class="nav navbar-nav navbar-right">
						<li class="dropdown">
							<a href="#" class="dropdown-toggle icon-menu" data-toggle="dropdown">
								<i class="lnr lnr-alarm"></i>
								<span class="badge bg-danger">5</span>
							</a>
							<ul class="dropdown-menu notifications">
								<li><a href="#" class="notification-item"><span class="dot bg-warning"></span>欢迎来到家教平台</a></li>
								<li><a href="#" class="notification-item"><span class="dot bg-danger"></span>您有新的优惠待领取</a></li>
								<li><a href="#" class="notification-item"><span class="dot bg-success"></span>您的课程审核中</a></li>
								<li><a href="#" class="notification-item"><span class="dot bg-warning"></span>代办事项</a></li>
								<li><a href="#" class="notification-item"><span class="dot bg-success"></span>家庭教师招募中</a></li>
								<li><a href="#" class="more">查看所有信息</a></li>
							</ul>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="lnr lnr-question-circle"></i> <span>帮助</span> <i class="icon-submenu lnr lnr-chevron-down"></i></a>
							<ul class="dropdown-menu">
								<li><a href="#">基本使用说明</a></li>
								<li><a href="#">数据处理</a></li>
								<li><a href="#">安全性</a></li>
								<li><a href="#">疑难解决</a></li>
							</ul>
						</li>
						<li class="dropdown">
							<a href="#" class="dropdown-toggle" data-toggle="dropdown"><img src="" class="img-circle" alt=""> <span>用户中心</span> <i class="icon-submenu lnr lnr-chevron-down"></i></a>
							<ul class="dropdown-menu">
								<li><a href="#"><i class="lnr lnr-user"></i> <span>我的设置</span></a></li>
								<li><a href="#"><i class="lnr lnr-envelope"></i> <span>信息</span></a></li>
								<li><a href="#"><i class="lnr lnr-cog"></i> <span>设置</span></a></li>
								<li><a href="#"><i class="lnr lnr-exit"></i> <span>注销</span></a></li>
							</ul>
						</li>
					    
					</ul>
				</div>
			</div>
		</nav>
		<!-- END NAVBAR -->
		<!-- LEFT SIDEBAR -->
		<div id="sidebar-nav" class="sidebar">
			<div class="sidebar-scroll">
				<nav>
					<ul class="nav">
						<li><a href="allCenter" class="active"><i class="lnr lnr-home"></i> <span>主页</span></a></li>
						<li>
							<a href="#subPages" data-toggle="collapse" class="collapsed"><i class="lnr lnr-file-empty"></i> <span>用户功能列表</span> <i class="icon-submenu lnr lnr-chevron-left"></i></a>
							<div id="subPages" class="collapse ">
								<ul class="nav">
								    <li><a href="invite.jsp" class="">聘用家教</a></li>
									<li><a href="userDemand.jsp" class="">发布家教招聘信息</a></li>
									<li><a href="myemp" class="">招聘信息中心</a></li>
									<li><a href="center" class="">订单中心</a></li>
									<li><a href="myinfo" class="">个人中心</a></li>
									<li><a href="userallhis" class="">历史订单</a></li>
									<li><a href="check.jsp" class="">注册成为家教</a></li>
								</ul>
							</div>
						</li>
						<li>
							<a href="#subPagess" data-toggle="collapse" class="collapsed"><i class="lnr lnr-file-empty"></i> <span>家教功能列表</span> <i class="icon-submenu lnr lnr-chevron-left"></i></a>
							<div id="subPagess" class="collapse ">
								<ul class="nav">
									<li><a href="placeOrders.jsp" class="">开设课程</a></li>
									<li><a href="employment" class="">查看招聘信息</a></li>
									<li><a href="tutorCenter" class="">订单中心</a></li>
									<li><a href="tutorallhis" class="">历史订单</a></li>
								</ul>
							</div>
						</li>
					</ul>
				</nav>
			</div>
		</div>
		<!-- END LEFT SIDEBAR -->
		<!-- MAIN -->
		<div class="main">
			<!-- MAIN CONTENT -->
			<div class="main-content">
				<div class="container-fluid">
					<!-- OVERVIEW -->
					<div class="panel panel-headline">
						<div>	
 								<span style="color:green">${request.info}</span> 		
								<table class="table table-bordered">
							    <caption>您发布的招聘信息如下:</caption><BR>
							    
							    <thead>
							      <tr>				        
							     	 <th>需求年级</th>
							      	 <th>需求课程</th>
							     	 <th>需求学历</th>
							      	 <th>性别</th>	
							      	 <th>预期价格</th>
							      	 <th>时间要求</th>
							      	 <th>辐射地址</th>
							      	 <th>详细要求</th>				
							     	 <th>申请状态</th>
							     	 <th>操作</th>
							     </tr>
							   </thead>
							   <tbody>
							  <!--  -->
							  <s:iterator  value="list" id="one">
								<tr>
									
									<td><s:property value="type"/></td>
									<td><s:property value="course"/></td>						
									<td><s:property value="background"/></td>
									<td><s:property value="sex"/></td>
									<td><s:property value="price"/></td>
									<td><s:property value="date"/></td>
									<td><s:property value="address"/></td>
									<td><s:property value="needOrPresentation"/></td>
									<td>
									<s:set name="status" value="status"/>
									<s:set name="id" value="employmentID"/>
									<s:if test="#status==0">发布中</s:if>
									<s:if test="#status==1">家教发起申请</s:if>
									<s:if test="#status==2">课程进行中</s:if>
									<s:if test="#status==3">家教发起课程结束申请</s:if>
									</td>
									<td>
									<s:if test="#status==0">
									<%
								
									out.print("<button class=\"btn btn-default\" onclick=\"change(this.value)\" value=\"");
									%>
									<s:property value="employmentID"/>
									<%
									out.println("\">修改信息</button>");
									%>
									<s:a href="empdelete?empID=%{#one.employmentID}"><button class="btn btn-default">删除</button></s:a>
									</s:if>
									
									<s:if test="#status==1">
									<s:a href="empaccept?empID=%{#one.employmentID}"><button class="btn btn-default">接受申请</button></s:a>
									<s:a href="emprefuse?empID=%{#one.employmentID}"><button class="btn btn-default">拒绝申请</button></s:a>
									<%
								
									out.print("<button class=\"btn btn-default\" onclick=\"getTutor(this.value)\" value=\"");
									%>
									<s:property value="employmentID"/>
									<%
									out.println("\">申请信息</button>");
									%>
									</s:if>
									
									<s:if test="#status==2">
									课程进行中
									<%
								
									out.print("<button class=\"btn btn-default\" onclick=\"getTutor(this.value)\" value=\"");
									%>
									<s:property value="employmentID"/>
									<%
									out.println("\">查看家教信息</button>");
									%>
									
									</s:if>				
									<s:if test="#status==3">
									<s:a href="empfinish?empID=%{#one.employmentID}"><button class="btn btn-default">确认完成</button></s:a>
									
									</s:if>	
									
									
									</td>
								</tr>
							  </s:iterator>
							  </tbody>
							  </table>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
<div id="change-form" title="修改招聘信息" style="display:none">
  <p class="validateTips">请填入修改后的信息</p>
  <form>
  <fieldset>
    <label for="money">金额：</label>
    <input type="text" name="emp.price" id="money" class="text ui-widget-content ui-corner-all"><br>
    <label for="time">时间：</label>
    <input type="text" name="emp.date" id="date" value="" class="text ui-widget-content ui-corner-all"><br>
    <label for="address">地址：</label>
    <input type="text" name="emp.address" id="address" value="" class="text ui-widget-content ui-corner-all"><br>
    <label for="more">详细要求：</label><br>   
    &nbsp;&nbsp;&nbsp;
    &nbsp;&nbsp;&nbsp;
    &nbsp;
    <textarea name="emp.needOrPresentation" id="text" clos="55" rows="5" warp="virtual" class="text ui-widget-content ui-corner-all"></textarea>
  </fieldset>
  </form>
</div>
	<!-- END WRAPPER -->
	<!-- Javascript -->
	<script src="assets/vendor/jquery/jquery.min.js"></script>
	<script src="assets/vendor/bootstrap/js/bootstrap.min.js"></script>
	<script src="assets/vendor/jquery-slimscroll/jquery.slimscroll.min.js"></script>
	<script src="assets/vendor/jquery.easy-pie-chart/jquery.easypiechart.min.js"></script>
	<script src="assets/vendor/chartist/js/chartist.min.js"></script>
	<script src="assets/scripts/klorofil-common.js"></script>
	
	<script src="//apps.bdimg.com/libs/jquery/1.10.2/jquery.min.js"></script>
  	<script src="//apps.bdimg.com/libs/jqueryui/1.10.4/jquery-ui.min.js"></script>
	<script>
	function change(e){	
		
		$( "#change-form" ).dialog({
		      autoOpen: false,
		      height: 300,
		      width: 350,
		      modal: true,
		      buttons: {
		        "确认修改": function() {
		        	var empID = e.trim();
		        	var money = document.getElementById("money").value.trim();
		        	var date = document.getElementById("date").value.trim();
		        	var address = document.getElementById("address").value.trim();
		        	var text = document.getElementById("text").value.trim();
		    	     $.ajax({
		    	 			url:"empmod",
		    	 			data:{"empID":e,"money":money,"date":date,"address":address,"text":text},
		    	 			type:"post",
		    	 			success:function(data){
		    	 				
		    	 				location.reload();
		    	 				$( this ).dialog( "close" );
		    	 				
		    	 			}
		    	 	});
		    	    
		    	    $( this ).dialog( "close" );
		    	},
		        "关闭": function() {
		        	$( this ).dialog( "close" );
		        },
		      },
		      close: function() {
		        allFields.val( "" ).removeClass( "ui-state-error" );
		      }
		});
		$( "#change-form" ).dialog( "open" );
	}
	function getTutor(e){
		
		$.ajax({
 			url:"empissueinfo",
 			data:{"empID":e},
 			type:"post",
 			success:function(data){
 				$( "#dialog-form" ).html(data);
 			}
 		});
		$( "#dialog-form" ).dialog( "open" );
	}
	
	$(function() {
	    var name = $( "#name" ),
	      email = $( "#email" ),
	      password = $( "#password" ),
	      allFields = $( [] ).add( name ).add( email ).add( password ),
	      tips = $( ".validateTips" );
	 
	    function updateTips( t ) {
	      tips
	        .text( t )
	        .addClass( "ui-state-highlight" );
	      setTimeout(function() {
	        tips.removeClass( "ui-state-highlight", 1500 );
	      }, 500 );
	    }
	 
	    function checkLength( o, n, min, max ) {
	      if ( o.val().length > max || o.val().length < min ) {
	        o.addClass( "ui-state-error" );
	        updateTips( "" + n + " 的长度必须在 " +
	          min + " 和 " + max + " 之间。" );
	        return false;
	      } else {
	        return true;
	      }
	    }
	 
	    function checkRegexp( o, regexp, n ) {
	      if ( !( regexp.test( o.val() ) ) ) {
	        o.addClass( "ui-state-error" );
	        updateTips( n );
	        return false;
	      } else {
	        return true;
	      }
	    }
	 
	    $( "#dialog-form" ).dialog({
	      autoOpen: false,
	      height: 300,
	      width: 350,
	      modal: true,
	      buttons: {
	        "关闭": function() {
	        	$( this ).dialog( "close" );
	        },
	      },
	      close: function() {
	        allFields.val( "" ).removeClass( "ui-state-error" );
	      }
	    });
	    
	   	 
	    $( "#create-user" )
	      .button()
	      .click(function() {
	    	getInfo();
	        $( "#dialog-form" ).dialog( "open" );
	    });

		var data, options;

		// headline charts
		data = {
			labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
			series: [
				[23, 29, 24, 40, 25, 24, 35],
				[14, 25, 18, 34, 29, 38, 44],
			]
		};

		options = {
			height: 300,
			showArea: true,
			showLine: false,
			showPoint: false,
			fullWidth: true,
			axisX: {
				showGrid: false
			},
			lineSmooth: false,
		};

		new Chartist.Line('#headline-chart', data, options);


		// visits trend charts
		data = {
			labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
			series: [{
				name: 'series-real',
				data: [200, 380, 350, 320, 410, 450, 570, 400, 555, 620, 750, 900],
			}, {
				name: 'series-projection',
				data: [240, 350, 360, 380, 400, 450, 480, 523, 555, 600, 700, 800],
			}]
		};

		options = {
			fullWidth: true,
			lineSmooth: false,
			height: "270px",
			low: 0,
			high: 'auto',
			series: {
				'series-projection': {
					showArea: true,
					showPoint: false,
					showLine: false
				},
			},
			axisX: {
				showGrid: false,

			},
			axisY: {
				showGrid: false,
				onlyInteger: true,
				offset: 0,
			},
			chartPadding: {
				left: 20,
				right: 20
			}
		};

		new Chartist.Line('#visits-trends-chart', data, options);


		// visits chart

		new Chartist.Bar('#visits-chart', data, options);


		// real-time pie chart
		var sysLoad = $('#system-load').easyPieChart({
			size: 130,
			barColor: function(percent) {
				return "rgb(" + Math.round(200 * percent / 100) + ", " + Math.round(200 * (1.1 - percent / 100)) + ", 0)";
			},
			trackColor: 'rgba(245, 245, 245, 0.8)',
			scaleColor: false,
			lineWidth: 5,
			lineCap: "square",
			animate: 800
		});

		var updateInterval = 3000; // in milliseconds

		setInterval(function() {
			var randomVal;
			randomVal = getRandomInt(0, 100);

			sysLoad.data('easyPieChart').update(randomVal);
			sysLoad.find('.percent').text(randomVal);
		}, updateInterval);

		function getRandomInt(min, max) {
			return Math.floor(Math.random() * (max - min + 1)) + min;
		}

	});
	</script>
</body>

</html>